Enable clippy::use_self at workspace level and align codec implementations#79
Merged
Enable clippy::use_self at workspace level and align codec implementations#79
clippy::use_self at workspace level and align codec implementations#79Conversation
Co-authored-by: CommanderStorm <26258709+CommanderStorm@users.noreply.github.com> Agent-Logs-Url: https://github.com/fast-pack/FastPFOR-rs/sessions/3a614bfa-875a-4676-809a-0458acd944f8
Copilot
AI
changed the title
[WIP] Enable clippy::use_self at workspace level
Enable Mar 25, 2026
clippy::use_self at workspace level and align codec implementations
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables the clippy::use_self lint at the Cargo lint configuration level (root crate and fuzz crate) and updates a few Rust codec implementations to comply by using Self instead of repeating concrete type names.
Changes:
- Enable
use_self = "warn"under[lints.clippy]inCargo.tomlandfuzz/Cargo.toml. - Update
VariableByte,JustCopy, andFastPForimplementations to useSelfin constructors/defaults/associated calls to satisfyclippy::use_self.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Enables clippy::use_self for the main crate’s lint configuration. |
| fuzz/Cargo.toml | Enables clippy::use_self for the fuzz crate to keep lint settings aligned. |
| src/rust/integer_compression/fastpfor.rs | Replaces FastPFor { ... } with Self { ... } in new() to satisfy the lint. |
| src/rust/integer_compression/just_copy.rs | Uses Self / Self::new() in constructor and Default impl. |
| src/rust/integer_compression/variable_byte.rs | Uses Self / Self::... in constructor, Default, and AnyLenCodec impl. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Updated JustCopy struct to implement Default trait using default method.
nyurik
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change enables
clippy::use_selfin workspace lint configuration so the rule is enforced consistently. It also updates existing Rust codec code to conform to the newly enabled lint without changing behavior.Workspace lint configuration
use_self = "warn"under[lints.clippy]in:Cargo.tomlfuzz/Cargo.toml(to keep fuzz crate lint settings aligned with workspace expectations)Code updates required by
use_selfSelfin constructors/default impls and associated method calls:src/rust/integer_compression/fastpfor.rssrc/rust/integer_compression/just_copy.rssrc/rust/integer_compression/variable_byte.rsRepresentative change
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.